home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / Table / Sources / Selection.h < prev    next >
Encoding:
Text File  |  1996-04-25  |  3.1 KB  |  111 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                Selection.h
  4. //    Release Version:    $ ODF 1 $ 
  5. //
  6. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef SELECTION_H
  11. #define SELECTION_H
  12.  
  13. #ifndef PART_H
  14. #include "Part.h"
  15. #endif
  16.  
  17. #ifndef CELL_H
  18. #include "Cell.h"
  19. #endif
  20.  
  21. // ----- ODF Includes -----
  22.  
  23. #ifndef FWSELECT_H
  24. #include "FWSelect.h"
  25. #endif
  26.  
  27. //==============================================================================
  28. //    Forward declarations
  29. //==============================================================================
  30.  
  31. class CTablePart;
  32. class CTableProxy;
  33. class CTableContent;
  34. class CTableSelectionContent;
  35.  
  36. //==============================================================================
  37. //    class CTableSelection
  38. //==============================================================================
  39.  
  40. class CTableSelection : public FW_CSelection
  41. {
  42. //----------------------------------------------------------------------------------------
  43. //    Initialization/Destruction
  44. //
  45.   public:
  46.  
  47.     FW_DECLARE_AUTO(CTableSelection)
  48.  
  49.     CTableSelection(Environment* ev, CTablePart* tablePart, CTableContent* content);
  50.     virtual ~ CTableSelection();
  51.     
  52. //----------------------------------------------------------------------------------------
  53. //    Inherited API
  54. //
  55.   public:
  56.     virtual FW_Boolean        IsEmpty(Environment* ev) const;    
  57.     virtual void            CloseSelection(Environment* ev);
  58.     virtual void            ClearSelection(Environment* ev);
  59.     virtual void            SelectAll(Environment* ev);
  60.  
  61.     virtual FW_CContent*    GetSelectedContent(Environment* ev);
  62.     
  63.     // ----- Drag and Drop -----
  64.     virtual ODShape*        CreateSelectionShape(Environment* ev, ODFacet* facet, FW_CFrame* frame) const;
  65.     
  66.     virtual FW_Boolean        IsMouseInDraggableItem(Environment* ev, 
  67.                                 FW_CFrame* frame, 
  68.                                 const FW_CMouseEvent& theMouseEvent, 
  69.                                 FW_Boolean inBackground);
  70.                                 
  71.     virtual void            UpdateSelectionOnMouseDown(Environment* ev, 
  72.                                 const FW_CMouseEvent& mouseEvent,
  73.                                 ODFacet* embeddedFacet,
  74.                                 FW_Boolean inEmbeddedFrameBorder,
  75.                                 FW_Boolean inBackground);
  76.  
  77.     // ----- Linking Support -----
  78.     virtual FW_Boolean        CanPasteAsLink(Environment* ev, 
  79.                                 ODPasteAsMergeSetting& setting,
  80.                                 ODStorageUnit* su);
  81.  
  82.     virtual FW_Boolean        IsSelectionLinkable(Environment* ev);
  83.                                 // Don't allow publishing if cell is a link destination
  84.  
  85.     virtual FW_CLinkSource*    DoFindLinkSource(Environment* ev);
  86.  
  87. //----------------------------------------------------------------------------------------
  88. //    New API
  89. //
  90.   public:
  91.       CCell                GetSelectedCell() const;
  92.           
  93.     // ----- Selection -----
  94.     void                Select(Environment* ev, const CCell& cell);
  95.     
  96.     void                InvalidateSelection(Environment* ev);
  97.  
  98.     void                SelectProxy(Environment* ev, CTableProxy* proxy);
  99.  
  100. //----------------------------------------------------------------------------------------
  101. //    Data Members
  102. //
  103.   protected:
  104.     CTablePart*                fTablePart;
  105.     CTableContent*            fTableContent;
  106.     CTableSelectionContent*    fSelectionContent;
  107. };
  108.  
  109.  
  110. #endif
  111.